﻿using CocoaAni.Net.WebSockets.Messages;
using CocoaAni.Net.WebSockets.Server.ArgAdapters.Base;
using CocoaAni.Net.WebSockets.Server.DefineInfos;

namespace CocoaAni.Net.WebSockets.Server.ArgAdapters;

public class InternalWebSocketContextArgAdapter : MessageArgAdapter<WebSocketContext>
{
    public override WebSocketContext? GetTargetArg(MessageArgContext argContext)
    {
        return argContext.WebSocketContext;
    }
}
public class InternalMessageArgAdapter : MessageArgAdapter<Message>
{
    public override Message? GetTargetArg(MessageArgContext argContext)
    {
        return argContext.Message;
    }
}
public class InternalWebSocketParameterByTypeAdapter : MessageArgAdapter<WebSocket>
{
    public override WebSocket? GetTargetArg(MessageArgContext argContext)
    {
        return argContext.WebSocketContext.Socket;
    }
}